import openpyxl
from openpyxl.workbook import Workbook
from openpyxl.worksheet.worksheet import Worksheet



class Dofiel():
    def doExeRead(self,f,tai,minr,maxr,minc,maxc):
        wk:Workbook=openpyxl.load_workbook(f)
        st:Worksheet=wk[tai]
        s=st.iter_rows(minr,maxr,minc,maxc,values_only=True)
        l=[i for i in s]
        return l

if __name__ == '__main__':
    f = r'F:\work\codings\python\pro_test\date\yunSuanData.xlsx'
    dof=Dofiel()
    # dof.doExeRead(f,'sum',2,10,2,5)
    # l=dof.doExeRead(f, 'sum', 2, 10, 2, 5)
    # print(l)
    l1=dof.doExeRead(f,'jian',2,12,2,5)
    print(l1)











